From 7e98fc5ba662fc4c6323b865e5c466c125333056 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 7 Dec 2012 13:40:46 +0100 Subject: [PATCH] x86: properly fail mmuext ops when get_page_from_gfn() fails I noticed this inconsistency while analyzing the code for XSA-32. Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- xen/arch/x86/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index ab94b022c6..e2b74be6d4 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -2776,7 +2776,7 @@ long do_mmuext_op( page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC); if ( unlikely(!page) ) { - rc = -EINVAL; + okay = 0; break; } @@ -2836,6 +2836,7 @@ long do_mmuext_op( page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC); if ( unlikely(!page) ) { + okay = 0; MEM_LOG("Mfn %lx bad domain", op.arg1.mfn); break; } -- 2.30.2